﻿using System;
using System.IO;
using System.Threading.Tasks;
using Avalonia.Exusiai.Editor.ViewModels;
using Newtonsoft.Json;

namespace Avalonia.Exusiai.Editor.Models;

public class AppSettings
{
    // public static string LastOpenedFolder { get; set; }
    // public static AppSettings Load()
    // {
    //     try
    //     {
    //             var settings = File.ReadAllText("settings.json");
    //             return JsonConvert.DeserializeObject<AppSettings>(settings);
    //     }
    //     catch (Exception e)
    //     {
    //         Console.WriteLine(e);
    //         return new AppSettings();
    //     }
    // }
    // public void Save()
    // {
    //     LastOpenedFolder = GlobalData.Instance.SelectedFolder;
    //     var settings = JsonConvert.SerializeObject(this);
    //     File.WriteAllText("settings.json", settings);
    // }
}